package nyist.media.bean.role;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import nyist.media.entity.admin.Role;
import nyist.media.utils.DateUtil;

import java.util.Date;

/**
 * 角色列表
 *
 * @author wangshuai
 * @date 2018/12/23
 */
@Getter
@Setter
@NoArgsConstructor
public class RoleListBean extends RoleOptionBean {
    private static final long serialVersionUID = -1107951443236768823L;

    /**
     * 创建时间
     */
    @JSONField(format = DateUtil.DATETIME_FULL_FORMATTER_STR)
    private Date createDate;

    /**
     * 修改时间
     */
    @JSONField(format = DateUtil.DATETIME_FULL_FORMATTER_STR)
    private Date modifyDate;

    public RoleListBean(Role role) {
        super(role);
        this.createDate = role.getCreateDate();
        this.modifyDate = role.getModifyDate();
    }
}
